import java.awt.*;
public class Test_Paint {
    public static void main(String[] args) {
        new MyPaint().loadFrame();
    }
}
class  MyPaint extends Frame{
    public void loadFrame(){
        setBounds(200,200,600,40);
        setVisible(true);
    }
    @Override
    public void paint(Graphics g){
        //设置颜色
        g.setColor(Color.red);
//        g.drawOval(100,100,200,400);
        g.fillOval(200,200,300,300);
    }
}